import React from 'react';
import { Redirect } from 'react-router-dom';

import Home from '../pages/home';
import Music from '../pages/music';
import Hot from '../pages/hot';

import Set from '../pages/set';
import Theme from '../pages/set/c-components/theme'
import Work from '../pages/set/c-components/work'
import MusicStyle from '../pages/set/c-components/music-style'
import MusicVoice from '../pages/set/c-components/music-voice'
import BannerStyle from '../pages/set/c-components/banner-style'
import HotResource from '../pages/set/c-components/hot-resource'

import OffLine from '../components/online';

import Main from '../pages/main';

const routes = [
  {
    path: '/',
    exact: true,
    render: () => <Redirect to='/main/home' />,
  },
  {
    path: '/main',
    component: Main,
    routes: [
      {
        path: '/main/home',
        component: Home,
      },
      {
        path: '/main/music',
        component: Music,
      },
      {
        path: '/main/hot',
        component: Hot,
      },
      {
        path: '/mian/offonline',
        component: OffLine,
      },
      {
      path: '/main/set',
      component: Set,
      routes:[
          {
            path: '/main/set/theme',
            component: Theme,
          },
          {
            path: '/main/set/work',
            component: Work,
          },
          {
            path: '/main/set/musicstyle',
            component: MusicStyle,
          },
          {
            path: '/main/set/musicvoice',
            component: MusicVoice,
          },
          {
            path: '/main/set/musicmodel',
            component: BannerStyle,
          },
          {
            path: '/main/set/hotresorce',
            component: HotResource,
          },
          {
            path: '/main/set/helper',
            component: OffLine,
          },
    ]
  },
    ],
  },
];
export default routes;
